package cn.lixu.openfeign;

import cn.lixu.domain.Users;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ProjectName: springcloud-alibaba-parent-homework
 * @Package: cn.lixu.openfeign
 * @ClassName: UserOpenFeign
 * @Author: LIXU
 * @Description: 调用user
 * @Date: 2022/08/24 0024 23:06:07
 * @Version: 1.0
 **/
@FeignClient(value = "user-server",fallbackFactory = OpenFeignDownGrade.class)
@RequestMapping("/user")
public interface UserOpenFeign {

    @GetMapping("/getById/{id}")
    Users getById(@PathVariable("id") Long id);
}
